package com.coolgor.axnut.service.auth;

import java.util.List;

import com.coolgor.axnut.dto.auth.FunctionExecution;
import com.coolgor.axnut.dto.auth.RoleExecution;
import com.coolgor.axnut.entity.auth.Function;
import com.coolgor.axnut.entity.auth.LocalUser;
import com.coolgor.axnut.entity.auth.Role;
import com.coolgor.axnut.exceptions.auth.RoleOperationException;

public interface RoleService {
	
	Role getRole(long roleID);

	RoleExecution getRoleList(Role roleCondition, int pageIndex, int pageSize);
	
	RoleExecution getRoleListByUser(LocalUser user);
	
	RoleExecution getRoleTree(Role rootRole);
	
	FunctionExecution getFunctionTreeByRole(Function function, Role role);
	
	RoleExecution addRole(Role role) throws RoleOperationException;
	
	RoleExecution modifyRole(Role role) throws RoleOperationException;
	
	RoleExecution removeRole(Role role) throws RoleOperationException;
	
	RoleExecution batchRemoveRole(List<Role> roleList) throws RoleOperationException;
}